﻿//04.Sort 3 real values in descending order
//using nested if statements.

using System;

namespace DescendingSort
{
    class DescendingSort
    {
        static void Main()
        {
            Console.Write("Please enter the first number: ");
            int a = int.Parse(Console.ReadLine());
            Console.Write("Please enter the second number: ");
            int b = int.Parse(Console.ReadLine());
            Console.Write("Please enter the third number: ");
            int c = int.Parse(Console.ReadLine());

            if (a > b && b > c)
            {
                Console.WriteLine("{0}\n{1}\n{2}",a,b,c);
            }
            else if (a > c && c > b)
            {
                Console.WriteLine("{0}\n{1}\n{2}",a,c,b);
            }
            else if (b > a && a > c)
            {
                Console.WriteLine("{0}\n{1}\n{2}",b,a,c);
            }
            else if (b > c && c > a)
            {
                Console.WriteLine("{0}\n{1}\n{2}",b,c,a);
            }
            else if (c > a && a > b)
            {
                Console.WriteLine("{0}\n{1}\n{2}",c,a,b);
            }
            else
            {
                Console.WriteLine("{0}\n{1}\n{2}",c,b,a);
            }
        }
    }
}
